<?php
namespace app\common\validate;

use think\Validate;

class SkuValidate extends Validate
{
    protected $rule =   [
        'id'               => 'require|number',
        'page|页数'        => 'require|number',
        'limit|条数'       => 'require|number',
        'name|名称'        => 'require|length:1,255',
    ];
    
    protected $scene = [
        /** admin */
        'show'   => ['id'],
        'list'   => ['page', 'limit'],
        'add'    => ['name'],
        'edit'   => ['id', 'name'],
    ];
}